package com.up4years.controller.system;

import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.view.json.MappingJacksonJsonView;

import com.up4years.controller.base.BaseController;
@Controller
@RequestMapping("/home")
public class HomeController extends BaseController {
	
	@RequestMapping("/index.htm")
	public String index(){
		return "/index";
	}
	@RequestMapping("/menus.htm")
	public ModelAndView menus(){
		JSONArray array = new JSONArray();
		JSONObject json1 = new JSONObject();
			json1.put("name", "待审核");
			json1.put("url", "/employee/manage.htm");
		JSONObject json3 = new JSONObject();
			json3.put("name", "评价管理");
			json3.put("url", "");
		JSONObject json4 = new JSONObject();
			json4.put("name", "自助结算");
			json4.put("url", "/balance/nonauto.htm");
		JSONObject json5 = new JSONObject();
			json5.put("name", "结算查询");
			json5.put("url", "/balance/manage.htm");
		JSONObject json6 = new JSONObject();
			json6.put("name", "划账查询");
			json6.put("url", "");
		JSONObject json7 = new JSONObject();
			json7.put("name", "报表查询");
			json7.put("url", "");
		JSONObject json8 = new JSONObject();
			json8.put("name", "订单管理");
			json8.put("url", "");
		array.add(json1);
		array.add(json3);
		array.add(json4);
		array.add(json5);
		array.add(json6);
		array.add(json7);
		array.add(json8);
		return new ModelAndView(new MappingJacksonJsonView(),this.getSuccessResult(array));
	}
}
